<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    
    <h:head>
        <title>Principal</title>
    </h:head>
    
    <h:body>
        
    <h:form id="menuprincipal">
        
       <p:menubar>
       
          <p:submenu label="Cadastrar" icon="ui-icon-document">  
             <p:menuitem value="Candidatos" icon="ui-icon-document" url="/faces/cadastro_candidato.xhtml" ajax="true" />
             <p:menuitem value="Eleitores" icon="ui-icon-document" url="/faces/cadastro_eleitor.xhtml" ajax="true" />
          </p:submenu>
            
          <p:submenu label="Excluir" icon="ui-icon-close">  
             <p:menuitem value="Excluir Eleitores" url="/faces/exclui_eleitor.xhtml" icon="ui-icon-close" ajax="true" />
          </p:submenu>
  
          <p:submenu label="Editar" icon="ui-icon-pencil">  
             <p:menuitem value="Editar Candidatos" url="/faces/seleciona_candidato.xhtml" icon="ui-icon-pencil" ajax="false" />
          </p:submenu>
       
          <p:submenu label="Pesquisar" icon="ui-icon-search">
             <p:menuitem value="Pesquisar Eleitor" icon="ui-icon-search" url="/faces/pesquisa.xhtml" ajax="true" />
             <p:menuitem value="Exibir Todos" icon="ui-icon-search" url="/faces/relatorio.xhtml" ajax="true" />
          </p:submenu>
           
           <p:submenu label="Gráficos" icon="ui-icon-search">
               <p:menuitem value="Total de votos" icon="ui-icon-search" url="/faces/total_votos.xhtml" ajax="false" /> 
           </p:submenu>
  
          <p:submenu label="Ajuda" icon="ui-icon-help">  
              <p:menuitem value="Sobre o Sistema" icon="ui-icon-help" url="#" ajax="false" onclick="dialogo.show()" />
          </p:submenu>
           
       </p:menubar>  
      
    </h:form>
        
        <br />
        <p:pieChart id="basic" value="#{chartBean.pieModel}" legendPosition="ne" showDataLabels="true" title="Gráfico do Total de Votos" style="width: 500px; height: 500px; margin: 0 auto" />
                 
        <p:dialog id="modaldialogo" header="Sobre" widgetVar="dialogo" modal="true" height="100">
            <h:outputText value="Desenvolvido por Primatech Software Corporation - 2013" />
        </p:dialog>
        
        <div id="sobre" style="width: 100%; height: 25px; text-align: center; font-size: 15px; font-weight: bold; background: limegreen; color: black; margin-top: 500px">
           <p style="padding-top: 3px">DESENVOLVIDO POR PRIMATECH SOFTWARE CORPORATION - 2013</p>
        </div>
        
    </h:body>                           
    
</html>
